Method for determining the steady state behavior of a circuit using an iterative technique

ABSTRACT

An efficient method for determining the periodic steady state response of a circuit driven by a periodic signal, the method including the steps of 1) using a shooting method to form a non-linear system of equations for initial conditions of the circuit that directly result in the periodic steady state response; 2) solving the non-linear system via a Newton iterative method, where each iteration of the Newton method involves solution of a respective linear system of equations; and 3) for each iteration of the Newton method, solving the respective linear system of equations associated with the iteration of the Newton method via an iterative technique. The iterative technique may be a matrix-implicit application of a Krylov subspace technique, resulting in a computational cost that grows approximately in a linear fashion with the number of nodes in the circuit.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority from Provisional Application No.60/016,781, filed Apr. 30, 1996, the entire disclosure of which(including all attached documents) is hereby incorporated by reference.

BACKGROUND OF THE INVENTION

The present invention relates generally to the analysis of thesteady-state behavior of circuits driven by a periodic input signal.

The rapid growth in the field of wireless RF telecommunications hasprovided significant motivation for the development of simulation toolsthat can quickly and accurately analyze both the steady-state behaviorand the response to multiple-frequency excitations of nonlinearcircuits. FIG. 1A depicts a generic circuit 10 that is frequentlyanalyzed in engineering applications. Circuit 10 is driven by a periodicinput signal 11, u(t), of arbitrary shape, and has an output 12, v(t),that is periodic with the same frequency as u(t) when circuit 10 hasreached a steady state. There is a great need for computationallyefficient techniques for determining the steady-state behavior of acircuit such as circuit 10, particularly given the fact that frequentlythe circuit behavior must be characterized over a wide range of inputsignal frequencies and amplitudes.

One traditional technique for determining a periodic steady-statesolution (PSS) is transient analysis. This technique involvesdetermining respective states of the circuit at a series of timepoints(starting at time zero with a set of initial conditions), the statedetermined for the circuit at any particular timepoint depending on thestate determined for the circuit at the previous timepoint. Thetechnique terminates upon detecting that a steady-state has beenreached. Transient analysis requires several timepoints per period ofthe input signal, and thus is often impractical in circuits having atime constant many orders of magnitude greater than the period of theinput signal. For example, FIG. 1B depicts a self-biased amplifiercircuit 20 that is driven by a periodic input signal 21, u(t). The timeconstant of circuit 20 might be chosen to be several orders of magnitudelarger than the largest possible period for u(t), thereby requiringtransient analysis over thousands of timepoints.

Another prior art technique for obtaining the PSS solution for a circuitinvolves the use of the shooting-Newton method. This method uses aNewton iterative technique to compute a series of estimates for the PSS.The difference between each estimate in the series and the previousestimate is determined by solving a respective linear system ofequations via Gaussian elimination. Obtaining the solution for eachlinear system by Gaussian elimination involves factorization of a denseN by N matrix, where N represents the number of nodes in the circuit,and thus requires a computation time that increases with the third powerof N. For this reason, prior art shooting-Newton techniques forobtaining a PSS solution are often impractical for circuits with a largenumber of nodes.

Another prior art technique for obtaining a PSS solution involves theuse of a finite-difference method. Such a method discretizes the circuitdifferential equations at a set of timepoints spanning an interval ofthe input signal to obtain a set of difference equations. Solution ofthis set of difference equations provides a PSS solution for each of thetimepoints simultaneously. Like the previous PSS methods discussed, PSStechniques based on finite-difference methods typically have acomputational cost that grows as the cube of the number of circuitnodes, and thus also may be impractical for large circuits.

FIG. 1C depicts another type of generic circuit 30 that is frequentlyanalyzed in engineering applications. Circuit 30 is driven by twoperiodic input signals 31-32, u_(l) and u_(s). u_(s) is a smallsinusoidal signal of much smaller amplitude than u_(l). u_(l) isperiodic with arbitrary shape. One approach to the solution of circuit30 is transient analysis. Transient analysis may be a very expensiveoption, particularly where one of the input signals is of much higherfrequency than the other. For example, FIG. 1D depicts aswitched-capacitor filter circuit 40 driven by a periodic signal u_(s)to be filtered and a high frequency clock signal u_(l) that controls thestate of a transistor 41. To ensure accurate results, transient analysismust cover several timepoints per period of the high frequency clocku_(l), even though the frequency of the filtered signal u_(s) is muchlower.

Another approach to studying the behavior of circuit 30, known asPeriodic Time-Variant Analysis (PTV), treats the small input signal,u_(s), as a small perturbation to the periodic steady-state (PSS)response of circuit 30 to u_(l) when u_(s) =0. In particular, typically,a small-signal steady-state response is determined at a set of timepoints spanning a period of u_(l), by linearizing the differentialequations for circuit 30 about the PSS response, and then discretizingthe resulting system at the set of time points. Such a technique has acomputational cost that grows with the third power of the number ofcircuit nodes, and for this reason, is impractical for large circuits.

FIG. 1E depicts another generic circuit 50 of a type frequently analyzedin engineering applications (e.g., mixer circuits). Circuit 50 is drivenby d periodic signals 51 of unrelated frequencies, and typically has asteady-state response 52 that is quasiperiodic in d frequencies. Oneapproach to determining a quasiperiodic response involves the use ofmixed frequency-time methods as described in detail in chapter 7 of thetext "Steady-State Methods for Simulating Analog and Microwave Circuits"by Kundert et al. However, such methods typically have a computationalcost that grows with the third power of the number of circuit nodes, andfor this reason, are impractical for large circuits.

SUMMARY OF THE INVENTION

As discussed above in the background section, various prior arttechniques for steady-state and small signal analysis have acomputational cost that grows with the third power of the number ofcircuit nodes, and are thus impractical for large circuits. By contrast,the present invention provides efficient techniques for steady-state andsmall signal analysis having a computational cost that is approximatelylinear in the number of circuit nodes. These techniques are, thus,practical for large circuits that cannot be feasibly handled by priorart techniques.

In particular, the present invention provides an efficient method fordetermining the periodic steady state response of a circuit driven by aperiodic signal, the method including the steps of 1) using a shootingmethod to form a non-linear system of equations for initial conditionsof the circuit that directly result in the periodic steady stateresponse; 2) solving the non-linear system via a Newton iterativemethod, where each iteration of the Newton method involves solution of arespective linear system of equations; and 3) for each iteration of theNewton method, solving the respective linear system of equationsassociated with the iteration of the Newton method via a matrix-implicititerative technique.

In one embodiment, the iterative technique is a matrix-implicitapplication of a Krylov subspace technique, resulting in a computationalcost that grows approximately in a linear fashion with the number ofnodes in the circuit, in contrast to typical shooting methods used toobtain a periodic steady state response whose computational cost growswith the cube of the number of circuit nodes. Thus, the disclosed methodrenders feasible periodic steady state analysis of circuits much largerthan those that could be analyzed via previous methods. In addition, theinvention provides an efficient finite-difference technique forobtaining a PSS solution, the technique having a computational cost thatalso grows approximately in a linear fashion with the number of nodes inthe circuit. An efficient technique that is almost linear in the numberof circuit nodes is also provided for determining a quasiperiodicsteady-state response of a circuit driven by two or more signals ofunrelated frequencies.

The present invention also provides an efficient method for determiningthe small-signal steady state response to a small periodic signal of acircuit driven by a large periodic signal, the small-signal steady stateresponse covering a plurality of timepoints that span a period of thelarge periodic signal. The method includes the steps of 1) forming alinear system of equations for the small-signal steady state response atthe last of the timepoints; and 2) solving the linear system ofequations via a matrix-implicit iterative technique.

In one embodiment, the iterative technique is a matrix-implicitapplication of a Krylov subspace technique, resulting in a computationalcost that grows approximately in a linear fashion with the number ofnodes in the circuit. This is in contrast to typical methods which useGaussian elimination to solve the above linear system and whosecomputational cost grows with the cube of the number of circuit nodes.Thus, the disclosed method renders feasible small signal analysis ofcircuits much larger than those that could be analyzed via previousmethods. The efficiency of the disclosed method is particularlyimportant given that, typically, a small signal response is required fora range of frequencies.

In addition, the invention provides a technique for reusing("recycling"), during the determination of the small-signal steady-stateresponse for a particular small signal frequency, matrix-vector productspreviously obtained during the determination of the small-signalsteady-state response for another small signal frequency.

A further understanding of the nature and advantages of the presentinvention may be realized by reference to the remaining portions of thespecification and the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A depicts a generic circuit driven by a periodic signal ofarbitrary shape.

FIG. 1B depicts an example of the circuit type of FIG. 1A, i.e., aself-biased amplifier circuit that is driven by a periodic input signal.

FIG. 1C depicts a generic circuit driven by two signals, a firstperiodical signal of arbitrary shape and a second much smallersinusoidal signal.

FIG. 1D depicts an example of the circuit type of FIG. 1C, i.e., aswitched-capacitor filter circuit driven by a periodic signal to befiltered and a high frequency clock signal that controls the state of atransistor.

FIG. 1E depicts a generic circuit that is driven by d periodic signalsof unrelated frequencies.

FIG. 2 is a flowchart for a Newton method for obtaining a periodic statesolution (PSS).

FIG. 3 is a flowchart for carrying out step 201 of FIG. 2.

FIG. 4 is a flowchart for carrying out step 301 of FIG. 3.

FIG. 5 is a flowchart for solving the equation of step 401 of FIG. 4 viaNewton's method.

FIG. 6 is a flowchart for calculating ##EQU1## as required for step 302of FIG. 3.

FIG. 7 is a flowchart for a technique in accordance with the inventionfor obtaining a PSS solution.

FIG. 8 is a flow chart for a technique in accordance with the inventionto determine Ap^(i-1), which is required for step 701 of FIG. 7.

FIG. 9 is a flowchart for a technique in accordance with the inventionfor obtaining a small signal response of the circuit of FIG. 1C.

FIG. 10 is a flowchart for a matrix-implicit application of a Krylovsubspace technique for solving the linear system of step 904 in FIG. 9,and in particular for determining P_(M) *p^(i-1) during the ithiteration of the Krylov technique.

FIGS. 11A-B depict a flowchart for a finite-difference technique inaccordance with the invention for obtaining a periodic steady-statesolution (PSS) for the circuit of FIG. 1A.

FIG. 12 is a flowchart for a technique for recycling matrix-vectorproducts when determining two or more small signal responses.

FIG. 13 is a flowchart for obtaining a quasiperiodic solution of thecircuit of FIG. 1E via a mixed frequency-time technique.

DESCRIPTION OF SPECIFIC EMBODIMENTS

Periodic Steady-State Analysis Via Shooting-Newton Methods

As noted above, FIG. 1A depicts a generic circuit 10 that is frequentlyanalyzed in engineering applications. Circuit 10 is driven by anarbitrary periodic input signal 11, u, and has an output 12, v(t), thatshares a common period with u when circuit 10 has reached a steadystate. The nodal voltages of circuit 10 are characterized by a series ofN equations: ##EQU2## where N is the number of nodes in circuit 10,u(t)εR^(N) is the vector of input sources (each member of u is periodicwith period T), v(t)εR^(N) is the vector of node voltages, andq(v(t))εR^(N) is the vector of node charges. ##EQU3## i(v(t)), and u(t)represent capacitive, resistive and input currents, respectively. Theperiodic steady-state solution, V, for the nodal voltages of the circuitis the solution that satisfies equation (1) and in addition satisfiesthe two-point constraint:

    V(T)=V(0)                                                  (2)

Shooting methods reformulate the problem of solving equations (1) and(2) as the problem of finding V(0) satisfying:

    φ(V(0),0,T)-V(0)=0                                     (3)

where φ is the state-transition function for the circuit, i.e., φ(V(0),0, t) represents the vector of node voltages at time t given that thevector of node voltages at time zero is V(0). In other words, shootingmethods involve solving for initial conditions of the circuit, V(0),that directly result in the periodic steady-state solution, i.e. thatresult in those same conditions one period later at time T.

Equation (3) is in general a non-linear algebraic equation and can besolved by Newton's method. FIG. 2 depicts a flow-chart for solvingequation (3) via Newton's method according to the prior art. Applyingthis method to equation (3) results in the following iterative equation(step 201): ##EQU4## where I is the N×N identity matrix. Each iterationof equation (4) requires the solution (step 201) of a linear system ofequations Ax=b, where ##EQU5##

FIG. 3 depicts a flowchart 201' for the best prior art technique knownto the inventors for carrying out step 201 of FIG. 2, and involves 3basic steps, each of which is described in greater detail below:

a) calculation of φ(V₀ ^(k),0,T)--step 301 ##EQU6## c) solution of Ax=bvia Gaussian elimination--step 303

a: calculation of φ(V₀ ^(k),0,T)--Step 301

FIG. 4. depicts a flowchart 301' for carrying out step 301 of FIG. 3. Inparticular, FIG. 4 illustrates a technique for computing φ(V₀ ^(k),0,T)through transient analysis using a backward-Euler integration method.Using this method, equation (1) is discretized over M timepoints t₀, t₁.. . t_(M) to yield the following equation for m=1, 2, . . . M (step401): ##EQU7## where t₀ =0, t_(M) =T, h_(m) =t_(m) -t_(m-1), V₀ =V₀ ^(k)and v_(m) =φ(V₀ ^(k),0,t_(m)), for m=1,2, . . . M. The value determinedfor V_(M) is an approximation for φ(V₀ ^(k),0,T).

FIG. 5 illustrates a flowchart 401' for solving the equation of step 401(FIG. 4) via Newton's method. Using this method to solve equation (5)for V_(m), m=1, . . . M, yields the following iteration where l is theNewton iteration index (step 501): ##EQU8## where ##EQU9## Thecomputational cost of computing φ(V₀ ^(k),0,T) via transient analysis isapproximately of order MN(O(MN)) where, as noted above, N is the numberof circuit nodes and M is the number of timepoints.

b: Calculation of ∂φ(V₀ ^(k),0,T)/∂V₀ --Step 302

FIG. 6 illustrates a flowchart 302' for calculating ##EQU10## asrequired for step 302 (FIG. 3). Differentiating both sides of equation 5with respect to V₀ and applying the chain rule yields the followingequation for calculating ∂V_(m) /∂V₀ given ∂V_(m-1) /∂V₀, m=1,2, . . . M(step 601): ##EQU11## where C_(m) =C_(m) ^(L), G_(m) =G_(m) ^(L), and Lis the last value of l before convergence occurs in the calculation ofV_(m) via equation 6.

By repeated application of equation (7) for m=1,2, . . . M with theinitial condition ∂V₀ /∂V₀ =I, ∂V_(M) /∂V₀, i.e., ∂φ(V₀ ^(k),0,T)/∂V₀,can be determined. The values of C_(m), G_(m) and C_(m-1) are availablefrom the above computation of φ(V₀ ^(k),0,T) via equation (6).

Defining the cost of computing each column in ∂V_(m) /∂V₀ to be O(Sp),the cost per time-step m of computing ∂V_(m) /∂V₀ is O(NSp), given thatthe matrix ∂V_(m-1) /∂V₀ is dense. O(Sp) is nearly O(N) given that thereare only a few non-zero entries per row, representing elementconnectivity, in the sparse matrix C_(m) /h_(m) +G_(m). Thus, the totalcost of computing ∂V_(M) /∂V₀ is O(MNSp), i.e., approximately O(MN²).

c: Solution of Ax=b via Gaussian elimination--Step 303

The computational cost of obtaining this solution is O(N³), given thatthe matrix A=∂φ(V₀ ^(k),0,T)/∂V₀ -I is a dense N×N matrix. Thus, thetotal computational cost of obtaining the periodic steady state (PSS)solution via the above technique is approximately O(MN² +N³). This cost,which grows as the cube of the number of circuit nodes, becomesprohibitive for large circuits.

FIG. 7 illustrates a flowchart 700 for one possible method according tothe invention of lowering the cost of obtaining a PSS solution. Themethod carries out steps a and b, as described above, but solving thelinear system Ax=b via an iterative technique (step 701) instead ofusing Gaussian elimination. One possible such technique is the GMRESalgorithm presented immediately below in simplified form and describedin the paper by Saad, et al., entitled "GMRES: A Generalized MinimalResidual Algorithm for Solving Nonsymmeteric Linear Systems" (SIAM J.SCI. STAT. COMPUT., Vol. 7, No. 3, July 1986):

    ______________________________________                                        Algorithm I (GMRES algorithm for solving Ax = b)                                Guess at a solution, x.sup.0.                                                 Initialize the search direction p.sup.0 = b - Ax.sup.0                        Set i = 1.                                                                    do {                                                                                  Compute the new search direction, p.sup.i = Ap.sup.i-1.                         #STR1##                                                              - Choose α.sub.i in                                                                   x.sup.i = x.sup.i-1 + α.sub.i p.sup.i                                    to minimize ∥r.sup.i ∥ = ∥b                        - Ax.sup.i ∥.                                        If ∥r.sup.i ∥ < tolerance.sub.gmres, return x.sup.i                         as the solution.                                              else Set i = i + 1.                                                         ______________________________________                                    

The dominant cost in Algorithm 1 is O(N²) and results from the N²operations required to compute Ap^(i-1) on each GMRES iteration i. Inaddition, as described above in the discussion of step b, the costassociated with determining ∂φ(V₀ ^(k),0,T)/∂V₀ (which is required forthe computation of A) is approximately O(MN²). Thus, the totalcomputational cost of obtaining a PSS solution using Algorithm 1 isO(MN²). For large circuits, this cost may still be prohibitive.

One approach to further reducing the cost of obtaining a PSS solution isto use a technique that solves the linear system of equations Ax=bwithout calculating the matrix A, thereby avoiding the approximatelyO(MN²) cost of calculating ∂φ(V₀ ^(k),0,T)/∂V₀. Such a technique isreferred to herein as a "matrix-implicit" technique.

One possible matrix-implicit technique is based on the insight that theGMRES iterative algorithm (as presented above) does not require thevalue of A, but rather only the value of Ap^(i-1), for each GMRESiteration i. The values of Ax⁰ and Ax^(i), required for theinitialization and minimization steps, respectively, of the GMRESalgorithm, can be determined without calculating the value of A, via thesame techniques presented immediately below for calculating the value ofAp^(i-1).

The approximate value of Ap^(i-1) is given by the following equation:##EQU12## Ap^(i-1) can be evaluated in approximately O(MN) time viaequation (8), using the above-described backward-Euler integrationmethod to determine φ(V₀ ^(k),0,T) and φ(V₀ ^(k) +εp^(i-1),0,T).

FIG. 8 illustrates a flow chart 800 for a more computationally efficientand robust technique to determine Ap^(i-1), also having an approximatelyO(MN) computational cost. An initial value for p^(i), i.e., p₀ ^(i) isset to p^(i-1) (step 801). Then a sequence of values P_(m) ^(i),1≦m≦M,are determined via the following recurrence relation (step 802):##EQU13##

Since the matrix ##EQU14## is sparse, the computational cost ofdetermining p_(m) ^(i) via equation 9 is O(Sp), where O(Sp) is nearlyO(N). Thus, the cost of determining P_(M) ^(i) (=Ap^(i-1)), via repeatedapplication of equation (9), is O(MSp). As described above, the cost ofobtaining φ(V₀ ^(k),0,T) is also O(MSp). Thus, the above method forobtaining a PSS solution via a matrix-free application of the GMREStechnique is nearly linear in N, the number of circuit nodes, and thusis suitable for the analysis of circuits much larger than those thatcould be feasibly handled by previous methods.

In a preferred embodiment, for m=1,2, . . . M, the matrix C_(m) and thefactored form of the matrix [C_(m) /h_(m) +G_(m) ] determined for thelast iteration of equation (6) in the computation of V_(m) are stored inmemory, thereby eliminating the need to recompute these matrices whensolving equation (9). Given that the structure (i.e. locations ofnon-zero elements) of the matrices C_(m) and [C_(m) /h_(m) +G_(m) ] doesnot vary with m, the amount of storage required can be substantiallyreduced by storing each matrix as a compact series of non-zero elementsand storing first and second sets of structural information defining thestructure of all of the matrices C_(m), and the structure of all of thematrices [C_(m) /h_(m) +G_(m) ], respectively.

The GMRES algorithm discussed above is a member of the well known classof Krylov subspace (hereinafter "Krylov") techniques. Each Krylovtechnique provides an iterative method for solving a linear system ofequations Ax=b, and could substitute for GMRES in the above discussionof FIGS. 7 and 8. The dominant cost in each iteration i of a Krylovtechnique is associated with computing the product Ap^(i-1), wherep^(i-1) represents a search direction vector computed in the previousiteration. However, the matrix A itself is not required in a Krylovtechnique, and thus, as described herein, such a technique can be usednot only to solve a linear system iteratively but also in amatrix-implicit manner.

Periodic Small Signal Analysis

As noted above, FIG. 1C illustrates a generic circuit 30, driven by twoperiodic signals 31 and 32, u_(l) and u_(s). u_(l) is an arbitrarilyshaped large signal with period T_(L). u_(s) is a small sinusoidalsignal of the form u_(s) (t)=Re [A·e^(j2)πf s^(t) ].

FIG. 9 illustrate a flowchart 900 for one technique, known as PeriodicTime-Variant (PTV) analysis, that has been used to solve for the nodalvoltages of circuit 30 when u_(s) is small relative to u_(l). PTVanalysis treats the effect of u_(s) (t) as a small perturbation V_(s)(t) (also sometimes referred to as the "small signal response") to thesteady-state response V_(L) (t) of circuit 30 to u_(l) (t) when u_(s)(t)=0. This steady-state response can be determined by any of the PSStechniques disclosed herein (such as Newton-shooting orfinite-difference methods), or any other PSS technique. PTV analysis isdescribed in more detail in the Background Section of the paper"Efficient AC and Noise Analysis of Two-Tone RF circuits" byTelichevesky et al (in Proceedings of the 1996 Design AutomationConference, June 1996).

An initial step in PTV analysis involves linearizing the system ofdifferential equations for the nodal voltages of circuit 30 about V_(L)(t), thereby obtaining a time-varying linear system for the small signalresponse (step 901). Next, in step 902, the time-varying system obtainedin step 901 is discretized via a backward-Euler technique to obtain acomplex linear system for ν_(s) (t) (an approximation to V_(s) (t) at Mtimepoints t₁, t₂, , , , t_(M) spanning one period of u_(l) (i.e., t_(M)=T_(L)). ν_(s) and u_(s) are N×M-length vectors created by concatenatingall of the timesteps together. L is an N×M by N×M block lower bidiagonalreal matrix with blocksize N by N, and B is a block upper triangularreal matrix with only one nonzero N by N block in the upper right-handcorner.

The top right entry of matrix L arises from the following equationapplicable to a sinusoidal u_(s) :

    V.sub.s (t+T.sub.L)=V.sub.s (t)e.sup.j2πf s.sup.T L     (10)

Equation (10) permits the determination of the small signal responseV_(s) at an arbitrary time, given a characterization of V_(s) over anyinterval of length T_(L). The constraint imposed by equation (10), i.e.a sampled sinusoidal constraint, eliminates any transient behavior andensures that the time-varying linear system of differential equations ofstep 901 has a unique solution.

One important aspect of the equation of step 902 is that the MN by MNmatrix L⁻¹ B has non-zero entries only in the last N columns. Thisfeature simplifies the solution of ν_(S) (t_(M)), as described belowwith respect to steps 903-4. In the step 903, P_(M) is solved via thefollowing recursion:

    J.sub.1 P.sub.1 =-C.sub.M /h.sub.1 ;J.sub.l P.sub.l =(C.sub.l-1 /h.sub.l)P.sub.l-1                                        (11)

where 2≦l≦M, J_(i) =(C_(i) /h_(i))+G_(i), and P_(i) represents the((i-1)N)+1 through iN rows of the last N columns of L⁻¹ B.

In step 904, the linear system [I+α(f_(s)) P_(M) ]ν_(s) (t_(M))=-L⁻¹u_(s) (t_(M)) is solved via Gaussian elimination. Given that the matrix[I+α(f_(s))P_(M) ] is dense, the computational cost of step 904 isO(N³). Finally, in step 905, the value of ν_(s) (t_(M)) determined instep 904 is used to backsolve for ν_(s) (t_(M-1)), ν_(s) (t_(M-2)), . .. ν_(s) (t₁) via the equation [L+α(f_(s))B]ν_(s) =-u_(S). Thus, thecomputational cost associated with the technique of FIG. 9 grows as thecube of the number of circuit nodes. For this reason, the technique isnot feasible for very large circuits.

One alternative to Gaussian elimination for solving the linear system ofstep 904 is an iterative technique such as GMRES, described above. Inparticular, an iterative technique that would not explicitly compute thematrix [I+α(f_(s))P_(M) ] (and thus P_(M)) would be desirable. Such a"matrix-implicit" technique would avoid the O(N³) and approximatelyO(MN²) computational costs associated with steps 904 and 903,respectively.

One group of iterative techniques that could be used to solve the linearsystem of step 904 is the class of Krylov subspace techniques. Asdiscussed above, the dominant cost of a Krylov subspace technique usedto solve the linear system Ax=b is associated with the computation,during each iteration i, of Ap^(i-1), where p₀ represents an initialsearch direction vector and p^(i-1) represents a search direction vectorcomputed in the previous iteration. However, the matrix A itself is notrequired, and thus, as described herein, a Krylov technique can be usednot only to solve a linear system iteratively but also in amatrix-implicit manner.

FIG. 10 is a flowchart 1000 illustrating a matrix-implicit applicationof a Krylov subspace technique to solving the linear system of step 904,and in particular to determining P_(M) *p^(i-1) during the ith iterationof the Krylov technique. In step 1001, p₁ *p^(i-1) is determined bysolving the system J₁ (p₁ *p^(i-1))=-(C_(M) /h₁)*p^(i-1). In step 1002,the quantities P₂ *p^(i-1), P₃ *p^(i-1), . . . P_(M) *p^(i-1) aredetermined in turn by solving the following recursion for l=2, . . . M

    J.sub.l (P.sub.l *p.sup.i-1)=(C.sub.l-1 /h.sub.l)(P.sub.l-1 *p.sup.i-1)

The value for ν_(s) (t_(M)) returned from the final iteration of theKrylov technique is used as indicated in step 905 to backsolve for ν_(s)(t_(M-1)), . . . , ν_(s) (t₁).

Given that the matrices J_(i) are sparse, the cost of solving for eachvector P₁ *p⁻¹ is approximately O(N), and thus the cost of obtainingP_(M) *p^(i-1) and of obtaining ν_(s) (t_(M)) is approximately O(MN).Using a matrix-implicit application of a Krylov technique in the abovemanner, to obtain the small signal response at the last of a series oftimesteps spanning a period of the large input signal u_(l), results inan approximately O(MN) cost for the computation of the small signalresponse, ν_(s), over the period. Given that this technique isapproximately linear in N (the number of circuit nodes), it (unlike theO(N³) technique of FIG. 9) can be feasibly applied to very largecircuits. The importance of an efficient technique for determining asmall signal response is enhanced by the fact that frequently such aresponse is required for each of a multitude of small signal frequenciesin order to adequately characterize the circuit in question.

Recycling Matrix-Vector Products During Small Signal Analysis For ARange Of Frequencies

Another technique for further speeding up small signal analysis involvesreusing matrix-vector products computed, as described above, during amatrix-implicit Krylov solution of [I+∝(f₁)P_(M) ]ν_(s) (t_(M))=-L⁻¹u_(s) (t_(M)) (where u_(s) is a sinusoidal of a first frequency f₁) tothe solution of [I+∝(f₂)P_(M) ]ν_(s) (t_(M))=-L⁻¹ u_(s) (t_(M)) (whereu_(s) is a sinusoidal of a second frequency f₂). In particular, amatrix-vector product A₂ p^(k) required during the kth Krylov iterationfor frequency f₂, can be determined from a matrix-vector product A₁p^(k), computed during the kth Krylov iteration for frequency f₁ via thefollowing equation:

    A.sub.2 p.sup.k =βA.sub.1 p.sup.k +γp.sup.k     (12)

where A_(i) =[I+∝(f_(i))P_(M) ], i=1,2, β=∝(f₂)/∝(f₁) and γ=1-β.

FIG. 12 is a flowchart 1200 for a technique to solve the system (I+∝_(c)H)x=b_(c), over a range of small signal frequencies, f₁, f₂, . . .f_(NumFreq), where ∝_(c) =∝(f_(c)), H=P_(M), x=ν_(s) (t_(M)), b_(c)=-L⁻¹ u_(s) (t_(M)), and u_(s) is a sinusoidal of frequency f_(c). Thetechnique is based on a particular Krylov technique known as theGeneralized Conjugate Residual (GCR) algorithm (described in more detailin Yousef Saad, Iterative Methods for Sparse Linear Systems, PWSPublishing Company, 1995). However, as will be obvious to one ofordinary skill in the art, any Krylov technique can be adapted torecycle matrix-vector products in a manner analogous to that describedbelow (and in FIG. 12) for GCR.

The technique of FIG. 12 builds up a stored set of matrix-vectorproducts ap^(k) and vectors p^(k) for 1≦k≦ RecycleIndex, which can bereused. In particular, on GCR iteration k for frequency f_(c), thematrix-vector product ap^(k) is directly computed as (I+∝_(c) H)p^(k),as described above, if k>RecycleIndex (step 1201). Otherwise, thereexists a stored matrix-vector product for GCR iteration k which waspreviously computed and stored (step 1203) for another frequency (theparticular frequency being indicated by the stored variable index[k]).The stored matrix-vector product is reused via equation (12) to producea new matrix-vector product for iteration k (step 1202). RecycleIndexstores the current number of stored matrix-vector products, and isincremented whenever there is no stored matrix-vector product for thecurrent iteration (step 1201).

In step 1203, the newly computed matrix-vector product and p^(k) areorthogonalized and the orthogonalized matrix-vector product is storedfor the current GCR iteration k (overwriting an existing matrix-vectorproduct for GCR iteration k, if one exists). Also, in step 1203, thecurrent frequency index c is stored (as index[k]) with the storedmatrix-vector product in order to permit the correct value of βto beused whenever the stored product is later reused in step 1202 during thekth GCR iteration for another frequency. The operator "H" in theorthogonalization equations of step 1203 represent a Hermetian transposeoperation. The residue, r, and the solution x are updated in step 1204.

PSS Analysis Via Finite-Difference Methods

FIGS. 11A-B depict a flowchart 1100 illustrating an alternativetechnique for obtaining a periodic steady-state solution (PSS) for thecircuit of FIG. 1A, in particular, a technique based on afinite-difference method. This PSS technique is described after theabove discussion of small signal analysis instead of with the abovediscussion of a Newton-shooting PSS technique, because of thesimilarities between the computations performed in the technique of FIG.11 and those performed during small signal analysis, as described abovein reference to FIG. 10.

In step 1101, a backward-Euler technique is used to discretize thesystem of circuit equations (1) to obtain a non-linear system ofdifference equations for the PSS solution V at a series of S timepointst₀ =0, t₁, t₂, . . . , t_(s) =T, where T is the period of the periodicinput signal u in FIG. 1A. In step 1102, a Newton iteration is formed tosolve the non-linear system of step 1101. In step 1103, for eachiteration j of the Newton iteration of step 1102, the following twosteps are carried out:

1) solve for ΔV_(s) =V_(s).sup.(j+1) -V_(s).sup.(j), by applying amatrix-implicit iterative technique to the solution of the followinglinear system of equations:

    [I+P.sub.s ]ΔV.sub.s =-L.sup.-1 [(q(v.sub.s.sup.(j))-q(v.sub.s-1.sup.(j)))/h.sub.s +i(v.sub.s.sup.(j))+u.sub.s ]

where P_(s) represents the last N rows of the last N columns of L⁻¹ B.It will be readily apparent to one skilled in the art that ΔV_(s) can beobtained at an approximately O(SN) computational cost using a methodanalogous to that described above in reference to FIG. 10 for obtainingthe small signal response at the last timepoint, i.e., ν_(s) (t_(M)).This follows given the fact that the matrices L and B have essentiallythe same structure in step 1102 as in step 902 (FIG. 9).

2) given ΔV_(s) from step 1, backsolve for the rest of ΔV via the linearsystem of step 1102.

Thus, FIG. 11 provides an efficient finite-difference technique forobtaining a PSS solution, having a computational cost that growsapproximately in a linear fashion with the number of nodes in thecircuit.

Obtaining Ouasiperiodic Solutions Via Mixed Frequency-Time Methods

As noted above FIG. 1E depicts another generic circuit 50 of a typefrequently analyzed in engineering applications. Circuit 50 is driven byd periodic signals 51, u₁ (t), u₂ (t), . . . u_(d) (t), having unrelatedfundamental frequencies λ₁, λ₂, . . . λ_(d). Circuit 50 typically has asteady-state response 52, v(t), that is quasiperiodic in d frequencies,i.e., that can be expressed as a linear combination of sinusoids at thesum and difference frequencies from the set consisting of λ₁, λ₂, . . .λ_(d) and their harmonics, as given by the following Fourierrepresentation for v(t): ##EQU15## where Λ_(d) ={ω:ω=k₁ λ₁ +k₂ λ₂ + . .. k_(d) λ_(d) ; k₁,k₂. . . k_(d) are integers}.

Using λ_(d) as a sampling clock frequency, a sequence {v(sT):s is aninteger} is obtained where T=2π/λ_(d). The sequence {v(sT)} is itselfquasiperiodic in d-1 frequencies and is given by the following equation:##EQU16## where Λ_(d-1) ={ω:ω=k₁ λ₁ +k₂ λ₂ + . . . k_(d-1) λ_(d-1) ;k₁,k₂. . . k_(d-1) are integers}.

In order to make the analysis of equation (14) computationallytractable, the Fourier coefficients V^(C) and V^(S) are assumed to benon-zero for only a finite subset Λ_(K) of Λ_(d-1), thereby yielding thefollowing equation for the sequence {V (sT)}: ##EQU17## where Λ_(K) ={ω₀=0, ω₁, ω₂, . . . ω_(K) }.

Given the set of J=2K+1 Fourier coefficients (V(0), V^(C) (1), V^(S)(1), . . . V^(C) (K), V^(S) (K)) of equation (15), the value of v(t) canbe computed at any sample time sT. The value of v(t) for any t can befound through transient analysis, starting at the nearest precedingsample time. In order to solve for the J Fourier coefficients, valuesfor v(t) at J sample times must be determined.

FIG. 13 is a flowchart 1300 for a method of computing values for v(t) atJ non-adjacent sample times, η₁ T, η₂ T, . . . η_(J) T, where η₁, η₂, .. . η_(J) are integers. In essence, the method of FIG. 13 is based onusing J sample values at times η₁ T, η₂ T, . . . η_(J) T to determinethe immediately following sample values (i.e., at times (η₁ +1)T, η₂+1)T, . . . (η_(J) +1)T) in two independent ways. When circuit 50reaches its quasiperiodic steady-state of the form indicated by equation(15), the sample values determined for the times (η₁ +1)T, (η₂ +1)T, . .. (η_(J) +1)T via the two independent ways will be equal, therebyyielding the non-linear system of step 1302.

The first way to determine samples of v(t) at times (η₁ +1)T, (η₂ +1)T,. . . (η_(J) +1)T, given samples of v(t) at times η₁ T, η₂ T . . . η_(J)T follows from the fact that equation (15) can be used to solve for theJ Fourier coefficients (i.e., V(0), V^(C) (1), V^(S) (1), . . . V^(C)(K), V^(S) (K)) given the J sample values v(η₁ T), v(η₂ T), . . .v(η_(J) T). Given the Fourier coefficients, equation (15) can be used tocompute the value of any samples, including those at times (η₁ +1)T, (η₂+1)T, . . . (η_(J) +T). The matrix that needs to be multiplied with thevector of voltages at a circuit node at the times η₁ T, η₂ T, . . .η_(J) T in order to obtain the vector of voltages at the node at thefollowing sample times, (η₁ +1)T, (η₂ +1)T, . . . (η_(J) +1)T, is givenby the J×J delay matrix D(T) of step 1301.

The second way of obtaining sample values at times (η₁ +1)T, (η₂ +1)T, .. . (η_(J) +1)T involves integrating the circuit differential equations(i.e., performing transient analysis) over a time interval of length Tusing each of the samples at times η₁ T, η₂ T, . . . η_(J) T as astarting point, thereby obtaining Φ(v(η₁ T), η₁ T, (η₁ +1)T), φ(v(η₂ T),η₂ T, (η₂ +1)T), . . . φ(v(η_(J) t), η_(J) T, (η_(J) +1)T), where φ isthe state transition function.

The samples for the times (η₁ +1)T, (η₂ +1T), . . . (η_(j) +1)Tdetermined via the above two ways are equated to yield the non-linearsystem of step 1302. This system can be solved using a Newton-iterativemethod. A direct method solving the respective linear system arising oneach Newton iteration via Gaussian elimination has a computational costthat grows with the cube of the number of circuit nodes and is thusimpractical for large circuits. However, it will be readily apparent toone skilled in the art that the same matrix-implicit iterativetechniques used to solve the linear system of equation (4) can be usedto solve the respective linear system arising upon each iteration of aNewton-method solution for the non-linear system of step 1302, therebyresulting in a computational cost for obtaining the quasiperiodicsolution that is approximately linear in the number of circuit nodes.

Conclusion

In conclusion, the present invention provides efficient techniques forsteady-state and small signal analysis having a computational cost thatis approximately linear in the number of circuit nodes. These techniquesare, thus, practical for large circuits that cannot be feasibly handledby prior art techniques having a computational cost that grows with thethird power of the number of circuit nodes.

The above description is illustrative and not restrictive. For example,the backward-Euler discretization technique used herein could bereplaced with higher-order integration methods. In addition, theinvention is not limited to the particular Krylov techniques discussedherein, or even to the class of Krylov techniques, but rather could beused with any iterative technique for solving a linear system Ax=b thatdoes not require the value of the matrix A but rather only the value ofthe product of A with a vector.

Furthermore, the invention is equally applicable to various techniques,other than nodal analysis, for generating systems of differentialequations, such as modified nodal analysis, sparse tableau and stateequation techniques. The scope of the invention should, therefore, bedetermined not with reference to the above description, but insteadshould be determined with reference to the appended claims along withtheir full scope of equivalents.

What is claimed is:
 1. In a circuit simulation tool, a method fordetermining a periodic steady state response of a circuit driven by aperiodic signal, the periodic signal being an input to the circuit, themethod comprising the steps of:producing a first linear system ofequations characterizing nodal voltages of said circuit; producing asecond non-linear system of equations based on the first system ofequations using a shooting method, the second non-linear system ofequations representing initial conditions of the circuit that directlyresult in the periodic steady state response; solving the secondnon-linear system of equations using a Newton iterative method toproduce the periodic steady state response of the circuit, includingproducing for each iteration of the Newton method a corresponding thirdlinear system of equations based on the second non-linear system ofequations; for each iteration of the Newton method, solving itscorresponding third linear system of equations using a matrix-implicititerative technique, including providing a plurality of matrices storedin a memory to contain coefficients relating to the third linear systemof equations, each of the matrices having an identical structure, thestructure indicating locations of non-zero elements in each of thematrices; wherein data representing the structure is stored in thememory only once, and for each of the matrices, data representingnon-zero elements of the matrix are stored in the memory apart from thedata representing the structure; and providing the periodic steady stateresponse to the circuit simulation tool.
 2. The method of claim 1,wherein the matrix-implicit technique is a Krylov-subspace technique. 3.The method of claim 3, wherein the matrix-implicit technique uses ageneralized minimal residual algorithm.
 4. The method of claim 3,wherein the matrix-implicit technique uses a generalized conjugateresidual algorithm.
 5. In a circuit simulation tool, a method fordetermining a first small-signal quasiperiodic steady state response ofa circuit driven by a large periodic signal to a small sinusoid of afirst frequency, the first small-signal steady state response covering aplurality of timepoints that span a period of the large periodic signal,the plurality of timepoints including a last timepoint, the methodcomprising the steps of:forming a first linear system of equations forthe first small-signal steady state response of the circuit at aparticular one of the timepoints; solving the first linear system ofequations using a matrix-implicit iterative technique based on a classof Krylov subspace techniques, including producing a first matrix-vectorproduct and storing the first matrix-vector product in a memory;determining a second small-signal quasiperiodic steady state response ofthe circuit to a small sinusoid of a second frequency, the secondsmall-signal steady state response covering the plurality of timepoints,the step of determining the second small-signal steady state responsecomprising the substeps of:(i) forming a second linear system ofequations for the second small-signal steady state response at theparticular timepoint; (ii) solving the second linear system of equationsusing a Krylov-subspace technique, including producing a secondmatrix-vector product required by recycling the first matrix-vectorproduct; and providing the first and second small-signal steady stateresponses to a circuit simulation tool.
 6. The method of claim 5,wherein the particular timepoint is the last timepoint.
 7. The method ofclaim 6, wherein the matrix-implicit technique uses a generalizedminimal residual algorithm.
 8. The method of claim 6, wherein thematrix-implicit technique uses a generalized conjugate residualalgorithm.